<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: "App",
  computed: {
    key() {
      return this.$route.path;
    },
    keepAlive() {
      return this.$route.meta.keepAlive;
    },
  },
  watch: {
    $route: {
      //监听路由变化
      handler: function (to, from) {
        // console.log(to.meta.keepAlive, "this.cachedthis.cachedthis.cachedthis.cached")
      },
    },
  },
  mounted() { },
};
</script>
<style lang="scss"></style>
